package com.twp.auth.annotation;


import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.annotation.AliasFor;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import java.lang.annotation.*;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.CLASS;
import static java.lang.annotation.RetentionPolicy.RUNTIME;


/*basePackages = {"com.twp.*"}
        ,
        excludeFilters = {@ComponentScan.Filter(
                type = FilterType.REGEX,
                pattern = {"com.efivestar.job.category.admin.*"}
        )}*/

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@ComponentScan
@EnableJpaRepositories
@EntityScan
@EnableFeignClients
public @interface EnableAuth {

    String basePackage = "com.twp.*";

    @AliasFor("basePackages")
    String[] value() default {};
    @AliasFor("value")
    String[] basePackages() default {};

    String[] restBasePackages() default {".*[.reset.].*"};
}
